home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / u_man / cat1 / size.z / size
Encoding:
Text File  |  2002-10-03  |  8.2 KB  |  168 lines

  1. SIZE(1)                                                Last changed: 1-4-99
  2.  
  3.  
  4. NNAAMMEE
  5.      ssiizzee - Prints the section sizes of object files
  6.  
  7. SSYYNNOOPPSSIISS
  8.      ssiizzee [--dd --ff --nn --oo --44 --ssvvrr44 --xx --AA --BB --FF --VV] _f_i_l_e_s
  9.  
  10. IIMMPPLLEEMMEENNTTAATTIIOONN
  11.      IRIX systems
  12.  
  13. DDEESSCCRRIIPPTTIIOONN
  14.      The ssiizzee command prints segment or section information in bytes about
  15.      the various sections or segments of each named ELF object _f_i_l_e.  _f_i_l_e
  16.      can be an object or an archive.
  17.  
  18.      When calculating segment information, the ssiizzee command prints out the
  19.      total file size of the non-writable segments, the total file size of
  20.      the writable segments, and the total memory size minus the total file
  21.      size of the writable segments.
  22.  
  23.      If it cannot find segment information, ssiizzee performs calculations
  24.      based on section information.  When performing calculations based on
  25.      section information, it calculates the total size of sections that are
  26.      allocatable, non-writable and not NOBITS; the total size of the
  27.      sections that are allocatable, writable, and not NOBITS; and the total
  28.      size of the writable sections of type NOBITS (NOBITS sections do not
  29.      actually take up space in the _f_i_l_e.)  The following sections may be
  30.      mentioned and counted:  ..tteexxtt, ..iinniitt, ..rrddaattaa, ..ddaattaa, ..ssddaattaa, ..ssbbssss,
  31.      ..ddyynnssyymm, ..ddssoolliisstt, ..ccoonnfflliicctt, and ..llccllddttaa.  Some of the sections
  32.      marked allocatable, for example, ..ssttrrttaabb and ..ssyymmttaabb, may be a
  33.      surprise, because they do not seem as if they would be loaded at run
  34.      time.  However, some of this information does get into symbol tables
  35.      which, for shared-code (PIC) are in memory at run time so rrlldd(1) can
  36.      use them.
  37.  
  38.      By default, the output format is that of AT&T System V Release 3
  39.      showing sections (not segments) as described above followed by System
  40.      V Release 4-style totals.
  41.  
  42.      ssiizzee supports the following options:
  43.  
  44.      --dd   Prints the sizes in decimal.
  45.  
  46.      --ff   Prints out the size of each allocatable section, the name of the
  47.           section, and the total of the section sizes.  If there is no
  48.           section data, ssiizzee prints out an error message and stops
  49.           processing the file.  Segment information is ignored; only
  50.           section information is used.
  51.  
  52.      --nn   Prints out non-loadable segment or non-allocatable section sizes.
  53.           If segment data exists, ssiizzee prints out the memory size of each
  54.           loadable segment or file size of each non-loadable segment, the
  55.           permission flags, and the total size of the segments.  If there
  56.           is no segment data, ssiizzee prints out, for each allocatable and
  57.           non-allocatable section, the memory size, the section name, and
  58.           the total size of the sections.  If there is no segment or
  59.           section data, ssiizzee prints an error message and stops processing.
  60.  
  61.      --oo   Prints the sizes in octal.
  62.  
  63.      --44   Suppresses detailed listings, leaving just the AT&T System V
  64.           Release 4 summary output.  Prints segment information if present,
  65.           rather than section information (unless --ff is also specified).
  66.  
  67.      --ssvvrr44
  68.           The same as specifying --44, but deprecated as multi-letter options
  69.           are not appropriate under System V Release 4 option guidelines.
  70.  
  71.      --xx   Prints the sizes in hexadecimal.
  72.  
  73.      --AA   Use AT&T System V Release 3-style output.  This is the default
  74.           style.  This style is more verbose than the --44 output; each
  75.           section is printed with both size and physical and virtual
  76.           addresses.  It is followed by the System V Release 4-style
  77.           totals.  Segment information is ignored; only section information
  78.           is used.
  79.  
  80.      --BB   Use Berkeley-style (4.3BSD) output.  This style prints size
  81.           information for each section, regardless of whether the file
  82.           exists, and prints the total in both hexadecimal and decimal.
  83.           The tteexxtt and ddaattaa section sizes reported may be rounded to page
  84.           sizes.  In the rounding (done by lldd(1)) some bbssss may be moved
  85.           into ddaattaa.  The numbers reported are the actual numbers used to
  86.           load the program into memory.  Only sections named ..tteexxtt, ..iinniitt
  87.           or ..ffiinnii are counted as text.  Segment information is ignored;
  88.           only section information is used.
  89.  
  90.      --FF   Prints out the size of each loadable segment, the permission
  91.           flags of the segment, then the total of the loadable segment
  92.           sizes.  If there is no segment data, ssiizzee issues an error and
  93.           stops processing the file.
  94.  
  95.      --VV   Prints the version of ssiizzee on standard error.
  96.  
  97. EEXXAAMMPPLLEESS
  98.      The following examples show typical ssiizzee output.
  99.  
  100.           size -4 _f_i_l_e
  101.  
  102.           90112 + 12288 + 0 = 102400
  103.  
  104.           size -svr4 -f _f_i_l_e
  105.  
  106.           19(.interp) + 24(.reginfo) + 192(.dynamic) + 32(.liblist) /e
  107.           + 1200(.msym) + 1600(.dynstr) + 2384(.dynsym) + 1632(.hash) /e
  108.           + 82560(.text) + 32(.init) + 1472(.data) + 8000(.rodata) + /e
  109.           464(.got) + 48(.bss) = 99659
  110.  
  111.           size -4 -F _f_i_l_e
  112.  
  113.           90112(r-x) + 12288(rw-) = 109483
  114.  
  115. FFIILLEESS
  116.      //uussrr//iinncclluuddee//eellff..hh
  117.      //uussrr//iinncclluuddee//ssyyss//eellff..hh
  118.  
  119. DDIIAAGGNNOOSSTTIICCSS
  120.      If ssiizzee cannot calculate either segment or section information, it
  121.      prints an error message and stops processing the file.
  122.  
  123. NNOOTTEESS
  124.      Because the size of ..bbssss sections is not known until link-time, ssiizzee
  125.      will not give the true total size of pre-linked objects.
  126.  
  127.      The rounding shown by the --BB option can have effects that may be
  128.      surprising; reducing the size of data a small amount can result in
  129.      some bbssss space being moved from the rounded ddaattaa back into bbssss and
  130.      make bbssss appear to grow.
  131.  
  132.      Some sections are shown and counted as data with the --BB option that
  133.      might be considered text.  For example, the ..rrooddaattaa section is counted
  134.      as data even if it is part of the shared text program header segment.
  135.  
  136.      The --BB option interacts strangely with other options such as --nn and
  137.      --ff, making the output useless.
  138.  
  139.      If the --ssvvrr44, --44,, --AA, and --BB options are specified, the last one
  140.      specified is applied.
  141.  
  142.      For executables, ssiizzee --44 aa..oouutt is more accurate than ssiizzee --BB aa..oouutt
  143.      because the former reports totals of precisely what the kernel must
  144.      load (using segment information) and the latter reports how the
  145.      sections describe aa..oouutt; but this is counting only the text as text,
  146.      not counting ._d_y_n_s_y_m, etc.  The --BB format directly describes the
  147.      executable instructions (leaving out read-only tables), so for some
  148.      purposes it may be more useful.
  149.  
  150.      Most section names previously mentioned are described in the
  151.      Application Binary Interface books mentioned in the SEE ALSO section.
  152.      In addition, some sections are described in the _M_I_P_S_p_r_o _A_s_s_e_m_b_l_y
  153.      _L_a_n_g_u_a_g_e _P_r_o_g_r_a_m_m_e_r_s _G_u_i_d_e.
  154.  
  155. SSEEEE AALLSSOO
  156.      aa..oouutt(4)
  157.  
  158.      _S_y_s_t_e_m _V _A_p_p_l_i_c_a_t_i_o_n _B_i_n_a_r_y _I_n_t_e_r_f_a_c_e, Prentice Hall, ISBN
  159.      0-13-877598-2
  160.  
  161.      _S_y_s_t_e_m _V _A_p_p_l_i_c_a_t_i_o_n _B_i_n_a_r_y _I_n_t_e_r_f_a_c_e _M_I_P_S, Processor Supplement,
  162.      Prentice Hall, ISBN 0-13-880170-3
  163.  
  164.      _M_I_P_S_p_r_o _A_s_s_e_m_b_l_y _L_a_n_g_u_a_g_e _P_r_o_g_r_a_m_m_e_r'_s _G_u_i_d_e
  165.  
  166.      This man page is available only online.
  167.  
  168.